package character;
/**
 * Input is the equivalent of an edge for the NFA map.  An input has a title that designates what
 * the input is and the nextState is the state that the input points to.
 * 
 * Title: The character or character classes that fit for the input.
 * NextState: The state that the input points to.
 * 
 * A single input only points to a single state.
 * @author Will Grube
 *
 */
public class Input {

	public String title;
	public State nextState;
	
	/**
	 * Constructs an input with a title.
	 * @param title
	 */
	public Input(String title) {
		this.title = title;
	}
	
	/**
	 * Constructs an input with a title pointing to a state.
	 * @param title
	 * @param nextState
	 */
	public Input(String title, State nextState) {
		this.title = title;
		this.nextState = nextState;
	}
	
	/**
	 * Returns title
	 * @return
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * Sets title
	 * @param title
	 */
	public void setTitle(String title) {
		this.title = title;
	}
	
	/**
	 * Retrieves the next state
	 * @return
	 */

	public State getNextState() {
		return nextState;
	}

	/**
	 * Sets the state that the input points to.
	 * @param nextState
	 */
	public void setNextState(State nextState) {
		this.nextState = nextState;
	}

}
